<template>
	<view>
		<view style="text-align: center;">
			<image class="stop-icon" src="/static/aidex/images/stop.png"></image>
			<text style="display: block; font-weight: bold">停机记录</text>
		</view>
		<uni-list>
			<uni-list-item v-for="(item, index) in recordList" :key="index">
				<template slot="body">
					<uni-card is-full class="uni-list-card" padding="0" spacing="0">
						<view class="list-item-content">
							<view class="list-item-body">
								<view class="item-label">车间：</view>
								<view class="u-line-1 item-value">{{ item.recptCode }}</view>
							</view>
							<view class="list-item-body">
								<view class="item-label">工作站：</view>
								<view class="u-line-1 item-value">{{ item.recptName }}</view>
							</view>
							<view class="list-item-body">
								<view class="item-label">记录人员：</view>
								<view class="u-line-1 item-value">{{ item.vendorName }}</view>
							</view>
							<view class="list-item-body">
								<view class="item-label">当前工单：</view>
								<view class="u-line-1 item-value">{{ item.poCode }}</view>
							</view>
							<view class="list-item-body">
								<view class="item-label">当前工序：</view>
								<view class="u-line-1 item-value">{{ item.iqcCode }}</view>
							</view>
						</view>
					</uni-card>
				</template>
			</uni-list-item>
			<uni-list-item v-for="(item, index) in recordList">
				<template slot="body">
					<uni-card is-full class="uni-list-card" padding="0" spacing="0">
						<view class="list-item-content">
							<view class="list-item-body">
								<view class="item-label">机台设备：</view>
								<view class="u-line-1 item-value">{{ item.recptCode }}</view>
							</view>
							<view class="list-item-body">
								<view class="item-label">停机原因：</view>
								<view class="u-line-1 item-value">{{ item.reason }}</view>
							</view>
							<view class="list-item-body">
								<view class="item-label">停机时间：</view>
								<view class="u-line-1 item-value">{{ item.vendorName }}</view>
							</view>
						</view>
					</uni-card>
				</template>
			</uni-list-item>
		</uni-list>
	</view>
</template>

<script>
export default {
	data() {
		return {
			recordList: [{ recptCode: 1, reason: '机器故障' }]
		};
	},
	onLoad() {},
	methods: {}
};
</script>

<style scoped lang="scss">
.stop-icon {
	width: 200rpx;
	height: 200rpx;
}
.uni-list-card {
	border-radius: 20rpx;
}

.item-card-title-layout {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	margin: 0 20rpx;
	padding: 20rpx 0;
	border-bottom: 1px solid rgb(214, 215, 217);

	.item-card-title {
		font-size: 32rpx;
		color: #5a5a5a;
	}

	.item-card-status {
		padding: 5rpx 8rpx;
		font-size: 26rpx;
		color: #fff;

		&.status-1 {
			background-color: #9a9998;
		}

		&.status-2 {
			background-color: #f9ae3d;
		}

		&.status-3 {
			background-color: #3c9cff;
		}

		&.status-4 {
			background-color: #5ac725;
		}
		&.status-5 {
			background-color: #f56c6c;
		}
	}
}

.list-item-content {
	padding: 20rpx;
	border-bottom: 1px solid rgb(214, 215, 217);

	.list-item-body {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		line-height: 56rpx;

		.item-label,
		.item-value {
			color: #6a6a6a;
			font-size: 28rpx;
		}
	}
}
.card-actions {
	display: flex;
	flex-direction: row;
	align-items: center;
	.card-actions-item {
		font-size: 25rpx;
		flex: 1;
		text-align: center;
		padding: 20rpx 0;
		&.withdraw {
			color: #f56c6c;
		}
		&.division {
			border-right: 1px solid rgb(214, 215, 217);
		}
	}
}
.flex-botton {
	display: flex;
	justify-content: flex-end;
}
.btn {
	margin: 0;
}
.btn1 {
	margin-right: 20rpx;
	margin-left: 20rpx;
}
</style>
